using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace PUCIT.eFCS.DataAccess.Models.Mapping
{
    public class sectionMap : EntityTypeConfiguration<section>
    {
        public sectionMap()
        {
            // Primary Key
            this.HasKey(t => t.sectionId);

            // Properties
            this.Property(t => t.title)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("section");
            this.Property(t => t.sectionId).HasColumnName("sectionId");
            this.Property(t => t.documentId).HasColumnName("documentId");
            this.Property(t => t.sequenceNo).HasColumnName("sequenceNo");
            this.Property(t => t.title).HasColumnName("title");
        }
    }
}
